package com.vsct.maia.auditl.dto;
import java.util.List;


/**
 * Courbe d'un service

 * @author eric_karangwa
 *
 */
public class  ServiceExecTimes {
	
	private String service;
	private List<DatedExecTime> datedExecTimes;
	
	public ServiceExecTimes(String service, List<DatedExecTime> datedExecTimes) {
		super();
		this.service = service;
		this.datedExecTimes = datedExecTimes;
	}
	public String getService() {
		return service;
	}
	public List<DatedExecTime> getDatedExecTimes() {
		return datedExecTimes;
	}
	
	
	@Override
	public String toString() {
		StringBuilder str = new StringBuilder();
		str.append("name: '").append(service).append("',");
		str.append("data: [");
		boolean addComa = false;
		for (DatedExecTime datedExecTime : datedExecTimes) {
			if(addComa)
				str.append(",");
			str.append("{");
			str.append(datedExecTime.toString());
			str.append("}");
			addComa=true;
		}
		str.append("]");
		return str.toString();
	}
}
 